package server.business.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Select;
import server.business.pojo.BloodInformation;
import server.main.config.cache.MybatisPlusRedisCache;
import server.business.pojo.TransfusionApplicationInformation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
* @author Galaxy
* @description 针对表【transfusion_application_information】的数据库操作Mapper
* @createDate 2022-11-08 12:46:24
* @Entity server.business.pojo.TransfusionApplicationInformation
*/
@Mapper
//@CacheNamespace(implementation = MybatisPlusRedisCache.class)
public interface TransfusionApplicationInformationMapper extends BaseMapper<TransfusionApplicationInformation> {
    /**
     * 根据patient_id和血液样本编号找到找到分配的数据
     */
    @Select("select * from transfusion_application_information where patient_id=#{patientId} and " +
            "blood_number=#{bloodId} and is_deleted='0'")
    TransfusionApplicationInformation selectByBloodNumber(Long patientId,String bloodId);
}




